<!DOCTYPE html>
<html lang="zh-cn">
<head>
    {{template "header"}}
    <title>FrankZhang的博客空间</title>
</head>
<body>
<noscript>请启用您浏览器的 JavaScript 选项！</noscript>
{{template "nav" .}}

<!-- Post Header -->
<header class="intro-header" style="background-image: url('/static/img/favicon.png')">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="site-heading">
                    <h1>FrankZhang博客</h1>
                    <hr class="small">
                    <span class="subheading">2年经验程序员的私人coding旅程</span>
                </div>
            </div>
        </div>
    </div>
</header>

<div class="container">
    <div class="col-md-9 col-xs-9">
        {{range .Topics}}
        <div class="page-header">
            <h1><a href="/topic/v1/{{.Id}}">{{.Title}}</a></h1>
            <div class="row">
                <div class="col-md-10 col-xs-10">
                    <span class="small">文章发表于 {{dateformat .Created "2006-01-02 15:04:05"}}，共有 {{.Views}}次浏览，{{.ReplyCount}} 个评论</span>
                </div>
                <div class="col-md-2 col-xs-2" style="text-align: right">
                    <h6>By {{if .Author}}{{ .Author}}{{else}}佚名{{end}}</h6>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12 col-xs-12">
                    <div style="max-height:184px; display:block;overflow: hidden;">
                        {{str2html .Content}}
                    </div>
                </div>
            </div>
        </div>
        {{end}}
    </div>

    <div class="col-md-3 col-xs-3">
        <div class="list-group">
            <a href="#" class="list-group-item active">
                文章分类
            </a>
            {{range .Categories}}
            <a href="?cat={{.Title}}" class="list-group-item">
                <span class="badge">{{.TopicCount}}</span>
                {{.Title}}
            </a>
            {{end}}
        </div>
    </div>
</div>
</body>
{{template "js" .}}
</html>